package sis.report;

import java.util.EnumMap;
import java.util.Map;

import sis.studentinfo.Student.Grade;

public class ReportCard {

	public static final String A_MESSAGE = "Excellent";
	public static final String B_MESSAGE = "Very good";
	public static final String C_MESSAGE = "Hmm...";
	public static final String D_MESSAGE = "You're not trying";
	public static final String F_MESSAGE = "Loser";
	
	private Map<Grade, String> messages = null;
	
	public Map<Grade, String> getMessages() {
		if(messages == null) {
			this.loadMessages();
		}
		return messages;
	}

	private void loadMessages() {
		messages = new EnumMap<Grade, String>(Grade.class);
		messages.put(Grade.A, A_MESSAGE);
		messages.put(Grade.B, B_MESSAGE);
		messages.put(Grade.C, C_MESSAGE);
		messages.put(Grade.D, D_MESSAGE);
		messages.put(Grade.F, F_MESSAGE);
	}

	public String getMessage(Grade grade) {
		return this.getMessages().get(grade);
	}

}
